/*=============================================================================

  DIGITAL IO INTERFACE MODULE

  FILE: HIO.h
  
  DESCRIPTION

    Digital IO Flow control module definition

  EXTERNALIZED FUNCTIONS

    
  Copyright (c) DaeSung Engineering Inc. All rights reserved.

=============================================================================*/
/*=============================================================================

                             EDIT HISTORY

  ---------  -------  -------------------------------------------------------
    when       who     what, where, why
  ---------  -------  -------------------------------------------------------
   08/10/03   nso4th   Initial version

=============================================================================*/

#ifndef _HIO_H_
#define _HIO_H_

/*=============================================================================
  HEADER INCLUSION
=============================================================================*/
#ifdef _OBASE_LT_
//#include <OBaseLT.h>
#else
#include <mxBase.h>
#endif

#include <HIO_map.h>
#include <HIO_aux.h>

/*=============================================================================
  HIO CLASS DEFINITION
=============================================================================*/
class HIO : public HIOBase
{
public:
	HIO();
	~HIO();

/*---------------------------------------------------------
  OPERATION
---------------------------------------------------------*/
public:
	virtual boolean Init(char *pszName);
	virtual boolean Close(void);

	boolean Connect(void);
	boolean Disconnect(void);
	
	// Model & SN
	dword Model_ID(void);
	boolean Model_Name(char *pszMod, int32 szLen);	

	iodev_cfg_s *CFG_Get(void);
	
/*---------------------------------------------------------
  APPLICATION DEFINITION
---------------------------------------------------------*/
public:
	void INIT_IO_STATE(void);

/*---------------------------------------------------------
  IO CONTROL
---------------------------------------------------------*/
public:
	virtual boolean Output(dword dwChan, boolean bOn);
	
	boolean	InputSet(dword dwBlock, dword dwIn);
	boolean	InputBitSet(dword dwChan, boolean bOn);

/*---------------------------------------------------------
  PROTECTED MEMBERS
---------------------------------------------------------*/
protected:

//-------------------------------------
// LIB MODE
//-------------------------------------
protected:
	
/*---------------------------------------------------------
  EVENT HANDLER
---------------------------------------------------------*/
public:
	virtual dword Event_Handler(dword dwEvent, dword wParam, dword lParam);
protected:
	virtual dword Event_PreProc(dword dwEvent, dword wParam, dword lParam);
};

#endif /* _HIO_H_ */
/*--- END OF HIO.H ---*/
